Conversation
Minimal stubs for LLHttp::Parser, LLHttp::Delegate, and LLHttp::Error — just the surface referenced by the http gem's bundled sig/http.rbs (class Handler < LLHttp::Delegate, attr_reader parser: LLHttp::Parser) plus the Parser methods http's Response::Parser calls. Unblocks Steep users of the http gem, which otherwise fails signature load with RBS::NoSuperclassFoundError on LLHttp::Delegate.
|
@hakanensari Thanks for your contribution! Please follow the instructions below for each change. Available commandsYou can use the following commands by commenting on this PR.
|
There was a problem hiding this comment.
Pull request overview
Adds an RBS signature stub for the llhttp-ffi gem to provide the minimal LLHttp API surface needed by the http gem’s bundled RBS, preventing Steep/RBS signature load failures.
Changes:
- Introduce
LLHttp::Parser,LLHttp::Delegate, andLLHttp::Errorstubs in a newllhttp-ffi.rbs. - Add a minimal
_testthat exercises subclassingLLHttp::Delegateand calling the referencedLLHttp::Parsermethods.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| gems/llhttp-ffi/0.5/llhttp-ffi.rbs | Adds minimal RBS surface for LLHttp (Parser, Delegate, Error) needed by downstream signatures. |
| gems/llhttp-ffi/0.5/_test/test.rbs | Adds a signature-only test class inheriting from LLHttp::Delegate. |
| gems/llhttp-ffi/0.5/_test/test.rb | Adds a runtime/Steep test that instantiates LLHttp::Parser and calls required methods. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Use LLHttp::Delegate.new directly instead of defining a subclass in the test. Drops the companion test.rbs since there's no custom Ruby class left to declare. Steep already validates the subclass case when it loads http.rbs (class Handler < LLHttp::Delegate), so the test doesn't need to exercise it too.
|
/merge |
Minimal stubs for
LLHttp::Parser,LLHttp::Delegate, andLLHttp::Error. Just the surface referenced by the http gem's bundled sig/http.rbs (class Handler < LLHttp::Delegate,attr_reader parser: LLHttp::Parser) plus the Parser methods http'sResponse::Parsercalls.Unblocks Steep users of the http gem, which otherwise fails signature load with
RBS::NoSuperclassFoundErroronLLHttp::Delegate.